<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="CollectionDataSet" targetNamespace="http://tempuri.org/CollectionDataSet.xsd" xmlns:mstns="http://tempuri.org/CollectionDataSet.xsd" xmlns="http://tempuri.org/CollectionDataSet.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
  <xs:annotation>
    <xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
      <DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
        <Connections>
          <Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="SocialNetworkConnectionString" ConnectionStringObject="" IsAppSettingsProperty="True" Modifier="Assembly" Name="SocialNetworkConnectionString (Settings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.WLQuickApps.SocialNetwork.Data.Properties.Settings.GlobalReference.Default.SocialNetworkConnectionString" Provider="System.Data.SqlClient">
          </Connection>
        </Connections>
        <Tables>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="CollectionTableAdapter" GeneratorDataComponentClassName="CollectionTableAdapter" Name="Collection" UserDataComponentName="CollectionTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="SocialNetworkConnectionString (Settings)" DbObjectName="SocialNetwork.dbo.Collection" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="True" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetData" UserSourceName="Fill">
                <DeleteCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="False">
                    <CommandText>DELETE FROM [dbo].[Collection] WHERE (([BaseItemID] = @Original_BaseItemID))</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_BaseItemID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="BaseItemID" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </DeleteCommand>
                <InsertCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="False">
                    <CommandText>INSERT INTO [dbo].[Collection] ([BaseItemID]) VALUES (@BaseItemID);
SELECT BaseItemID FROM Collection WHERE (BaseItemID = @BaseItemID)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@BaseItemID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="BaseItemID" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="False">
                    <CommandText>SELECT BaseItemID FROM dbo.Collection</CommandText>
                    <Parameters>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
                <UpdateCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="False">
                    <CommandText>UPDATE [dbo].[Collection] SET [BaseItemID] = @BaseItemID WHERE (([BaseItemID] = @Original_BaseItemID));
SELECT BaseItemID FROM Collection WHERE (BaseItemID = @BaseItemID)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@BaseItemID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="BaseItemID" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_BaseItemID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="BaseItemID" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="BaseItemID" DataSetColumn="BaseItemID" />
            </Mappings>
            <Sources>
              <DbSource ConnectionRef="SocialNetworkConnectionString (Settings)" DbObjectName="" DbObjectType="Unknown" GenerateShortCommands="True" GeneratorSourceName="CreateCollection" Modifier="Public" Name="CreateCollection" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetDataBy" UserSourceName="CreateCollection">
                <InsertCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>INSERT INTO Collection (BaseItemID)
VALUES (@baseItemID);

SELECT SCOPE_IDENTITY()</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="baseItemID" ColumnName="BaseItemID" DataSourceName="SocialNetwork.dbo.Collection" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@baseItemID" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="BaseItemID" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
              </DbSource>
              <DbSource ConnectionRef="SocialNetworkConnectionString (Settings)" DbObjectName="SocialNetwork.dbo.Collection" DbObjectType="Table" GenerateShortCommands="True" GeneratorSourceName="GetCollection" Modifier="Public" Name="GetCollection" QueryType="Scalar" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetDataBy1" UserSourceName="GetCollection">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>SELECT BaseItemID FROM Collection
WHERE BaseItemID = @baseItemID</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="baseItemID" ColumnName="BaseItemID" DataSourceName="SocialNetwork.dbo.Collection" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@baseItemID" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="BaseItemID" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
              <DbSource ConnectionRef="SocialNetworkConnectionString (Settings)" DbObjectName="" DbObjectType="Unknown" GenerateMethods="Get" GenerateShortCommands="True" GeneratorGetMethodName="GetCollectionsByBaseItemID" GetMethodModifier="Public" GetMethodName="GetCollectionsByBaseItemID" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetCollectionsByBaseItemID" UserSourceName="GetCollectionsByBaseItemID1">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>WITH PageTable AS
(
SELECT        Collection.BaseItemID

		, ROW_NUMBER() over (order by Collection.BaseItemID) as RowID

FROM            Collection INNER JOIN
                         BaseItemAssociation ON Collection.BaseItemID = BaseItemAssociation.AssociatedBaseItemID
WHERE        (BaseItemAssociation.BaseItemID = @baseItemID)

)

select * from PageTable
where RowID between (@startRowIndex + 1) and (@startRowIndex + @maximumRows)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@baseItemID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@startRowIndex" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@maximumRows" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
              <DbSource ConnectionRef="SocialNetworkConnectionString (Settings)" DbObjectType="Unknown" GenerateShortCommands="True" GeneratorSourceName="GetCollectionsByBaseItemIDCount" Modifier="Public" Name="GetCollectionsByBaseItemIDCount" QueryType="Scalar" ScalarCallRetval="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetDataBy2" UserSourceName="GetCollectionsByBaseItemIDCount">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>SELECT COUNT(*) 
FROM            Collection INNER JOIN
                         BaseItemAssociation ON Collection.BaseItemID = BaseItemAssociation.AssociatedBaseItemID
WHERE        (BaseItemAssociation.BaseItemID = @baseItemID)
</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="baseItemID" ColumnName="BaseItemID" DataSourceName="SocialNetwork.dbo.BaseItemAssociation" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@baseItemID" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="BaseItemID" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
              <DbSource ConnectionRef="SocialNetworkConnectionString (Settings)" DbObjectName="" DbObjectType="Unknown" GenerateMethods="Get" GenerateShortCommands="True" GeneratorGetMethodName="GetCollectionsByCollectionType" GeneratorSourceName="FillBy" GetMethodModifier="Public" GetMethodName="GetCollectionsByCollectionType" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetCollectionsByCollectionType" UserSourceName="GetCollectionsByCollectionType1">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>WITH PageTable AS (SELECT        Collection.BaseItemID, ROW_NUMBER() OVER (ORDER BY Collection.BaseItemID) AS RowID
FROM            Collection INNER JOIN
                         BaseItem ON Collection.BaseItemID = BaseItem.BaseItemID
WHERE        (BaseItem.SubType = @collectionType))
    SELECT        *
     FROM            PageTable
     WHERE        RowID BETWEEN (@startRowIndex + 1) AND (@startRowIndex + @maximumRows)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="" ColumnName="SubType" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@collectionType" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="SubType" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" ColumnName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@startRowIndex" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@maximumRows" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
              <DbSource ConnectionRef="SocialNetworkConnectionString (Settings)" DbObjectType="Unknown" GenerateShortCommands="True" GeneratorSourceName="GetCollectionsByCollectionTypeCount" Modifier="Public" Name="GetCollectionsByCollectionTypeCount" QueryType="Scalar" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetDataBy3" UserSourceName="GetCollectionsByCollectionTypeCount">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>SELECT COUNT(*) 
FROM            Collection INNER JOIN
                         BaseItem ON Collection.BaseItemID = BaseItem.BaseItemID
WHERE        (BaseItem.SubType = @collectionType)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="collectionType" ColumnName="SubType" DataSourceName="SocialNetwork.dbo.BaseItem" DataTypeServer="varchar(50)" DbType="AnsiString" Direction="Input" ParameterName="@collectionType" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="SubType" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
              <DbSource ConnectionRef="SocialNetworkConnectionString (Settings)" DbObjectName="" DbObjectType="Unknown" GenerateMethods="Get" GenerateShortCommands="True" GeneratorGetMethodName="GetCollectionsByName" GetMethodModifier="Public" GetMethodName="GetCollectionsByName" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetCollectionsByName" UserSourceName="GetCollectionsByName1">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>WITH PageTable AS (SELECT        Collection.BaseItemID, ROW_NUMBER() OVER (ORDER BY Collection.BaseItemID) AS RowID
FROM            Collection INNER JOIN
                         BaseItem ON Collection.BaseItemID = BaseItem.BaseItemID
WHERE        (BaseItem.Title LIKE @name) AND (BaseItem.SubType = @collectionType))
    SELECT        *
     FROM            PageTable
     WHERE        RowID BETWEEN (@startRowIndex + 1) AND (@startRowIndex + @maximumRows)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="" ColumnName="Title" DataSourceName="" DbType="String" Direction="Input" ParameterName="@name" Precision="0" ProviderType="NVarChar" Scale="0" Size="255" SourceColumn="Title" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" ColumnName="SubType" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@collectionType" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" ColumnName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@startRowIndex" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@maximumRows" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
              <DbSource ConnectionRef="SocialNetworkConnectionString (Settings)" DbObjectType="Unknown" GenerateShortCommands="True" GeneratorSourceName="GetCollectionsByNameCount" Modifier="Public" Name="GetCollectionsByNameCount" QueryType="Scalar" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetDataBy4" UserSourceName="GetCollectionsByNameCount">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>SELECT COUNT(*)
FROM            Collection INNER JOIN
                         BaseItem ON Collection.BaseItemID = BaseItem.BaseItemID
WHERE        (BaseItem.Title LIKE @name) AND (BaseItem.SubType = @collectionType)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="name" ColumnName="Title" DataSourceName="SocialNetwork.dbo.BaseItem" DataTypeServer="nvarchar(255)" DbType="String" Direction="Input" ParameterName="@name" Precision="0" ProviderType="NVarChar" Scale="0" Size="255" SourceColumn="Title" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="collectionType" ColumnName="SubType" DataSourceName="SocialNetwork.dbo.BaseItem" DataTypeServer="varchar(50)" DbType="AnsiString" Direction="Input" ParameterName="@collectionType" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="SubType" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
              <DbSource ConnectionRef="SocialNetworkConnectionString (Settings)" DbObjectName="" DbObjectType="Unknown" GenerateMethods="Get" GenerateShortCommands="True" GeneratorGetMethodName="GetCollectionsByUser" GeneratorSourceName="FillBy2" GetMethodModifier="Public" GetMethodName="GetCollectionsByUser" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetCollectionsByUser" UserSourceName="GetCollectionsByUser1">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>WITH PageTable AS (SELECT        Collection.BaseItemID, ROW_NUMBER() OVER (ORDER BY Collection.BaseItemID) AS RowID
FROM            Collection INNER JOIN
                         BaseItem ON Collection.BaseItemID = BaseItem.BaseItemID
WHERE        (BaseItem.SubType = @collectionType) AND (BaseItem.OwnerUserID = @userID))
    SELECT        *
     FROM            PageTable
     WHERE        RowID BETWEEN (@startRowIndex + 1) AND (@startRowIndex + @maximumRows)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="" ColumnName="OwnerUserID" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@userID" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="16" SourceColumn="OwnerUserID" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" ColumnName="SubType" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@collectionType" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="SubType" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@startRowIndex" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@maximumRows" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
              <DbSource ConnectionRef="SocialNetworkConnectionString (Settings)" DbObjectType="Unknown" GenerateShortCommands="True" GeneratorSourceName="GetCollectionsByUserCount" Modifier="Public" Name="GetCollectionsByUserCount" QueryType="Scalar" ScalarCallRetval="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetDataBy5" UserSourceName="GetCollectionsByUserCount">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>SELECT COUNT(*) 
FROM            Collection INNER JOIN
                         BaseItem ON Collection.BaseItemID = BaseItem.BaseItemID
WHERE        (BaseItem.OwnerUserID = @userID) and (BaseItem.SubType = @collectionType)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="userID" ColumnName="OwnerUserID" DataSourceName="SocialNetwork.dbo.BaseItem" DataTypeServer="uniqueidentifier" DbType="Guid" Direction="Input" ParameterName="@userID" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="16" SourceColumn="OwnerUserID" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="collectionType" ColumnName="SubType" DataSourceName="SocialNetwork.dbo.BaseItem" DataTypeServer="varchar(50)" DbType="AnsiString" Direction="Input" ParameterName="@collectionType" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="SubType" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
              <DbSource ConnectionRef="SocialNetworkConnectionString (Settings)" DbObjectName="" DbObjectType="Unknown" GenerateMethods="Get" GenerateShortCommands="True" GeneratorGetMethodName="GetCollectionsForLocation" GetMethodModifier="Public" GetMethodName="GetCollectionsForLocation" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetCollectionsForLocation" UserSourceName="GetCollectionsForLocation1">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>WITH PageTable AS (SELECT        Collection.BaseItemID, ROW_NUMBER() OVER (ORDER BY Collection.BaseItemID) AS RowID
FROM            Collection INNER JOIN
                         BaseItem ON Collection.BaseItemID = BaseItem.BaseItemID INNER JOIN
                         CollectionLocation ON Collection.BaseItemID = CollectionLocation.BaseItemID
WHERE        (BaseItem.SubType = @collectionType) AND (CollectionLocation.LocationID = @locationID))
    SELECT        *
     FROM            PageTable
     WHERE        RowID BETWEEN (@startRowIndex + 1) AND (@startRowIndex + @maximumRows)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="" ColumnName="LocationID" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@locationID" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="16" SourceColumn="LocationID" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" ColumnName="SubType" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@collectionType" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="SubType" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@startRowIndex" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@maximumRows" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
              <DbSource ConnectionRef="SocialNetworkConnectionString (Settings)" DbObjectType="Unknown" GenerateShortCommands="True" GeneratorSourceName="GetCollectionsForLocationCount" Modifier="Public" Name="GetCollectionsForLocationCount" QueryType="Scalar" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetDataBy6" UserSourceName="GetCollectionsForLocationCount">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>SELECT COUNT(*)
FROM            Collection INNER JOIN
                         BaseItem ON Collection.BaseItemID = BaseItem.BaseItemID INNER JOIN
                         CollectionLocation ON Collection.BaseItemID = CollectionLocation.BaseItemID
WHERE        (BaseItem.SubType = @collectionType) AND (CollectionLocation.LocationID = @locationID)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="collectionType" ColumnName="SubType" DataSourceName="SocialNetwork.dbo.BaseItem" DataTypeServer="varchar(50)" DbType="AnsiString" Direction="Input" ParameterName="@collectionType" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="SubType" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="locationID" ColumnName="LocationID" DataSourceName="SocialNetwork.dbo.CollectionLocation" DataTypeServer="uniqueidentifier" DbType="Guid" Direction="Input" ParameterName="@locationID" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="16" SourceColumn="LocationID" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
              <DbSource ConnectionRef="SocialNetworkConnectionString (Settings)" DbObjectName="" DbObjectType="Unknown" GenerateMethods="Get" GenerateShortCommands="True" GeneratorGetMethodName="GetMostRecentCollections" GetMethodModifier="Public" GetMethodName="GetMostRecentCollections" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetMostRecentCollections" UserSourceName="GetMostRecentCollections1">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>WITH PageTable AS (SELECT        Collection.BaseItemID, ROW_NUMBER() OVER (ORDER BY BaseItem.CreateDate DESC) AS RowID
FROM            Collection INNER JOIN
                         BaseItem ON Collection.BaseItemID = BaseItem.BaseItemID
WHERE        (BaseItem.SubType = @collectionType))
    SELECT        *
     FROM            PageTable
     WHERE        RowID BETWEEN (@startRowIndex + 1) AND (@startRowIndex + @maximumRows)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="" ColumnName="SubType" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@collectionType" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="SubType" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@startRowIndex" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@maximumRows" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
              <DbSource ConnectionRef="SocialNetworkConnectionString (Settings)" DbObjectType="Unknown" GenerateShortCommands="True" GeneratorSourceName="IsLocationInCollection" Modifier="Public" Name="IsLocationInCollection" QueryType="Scalar" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetDataBy7" UserSourceName="IsLocationInCollection">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>SELECT CAST(COUNT(CollectionItem.BaseItemID) AS BIT) FROM CollectionItem
INNER JOIN BaseItem ON CollectionItem.BaseItemID = BaseItem.BaseItemID
WHERE BaseItem.LocationID = @locationID AND
CollectionItem.CollectionBaseItemID = @baseItemID</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="locationID" ColumnName="LocationID" DataSourceName="SocialNetwork.dbo.BaseItem" DataTypeServer="uniqueidentifier" DbType="Guid" Direction="Input" ParameterName="@locationID" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="16" SourceColumn="LocationID" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="baseItemID" ColumnName="CollectionBaseItemID" DataSourceName="SocialNetwork.dbo.CollectionItem" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@baseItemID" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="CollectionBaseItemID" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </Sources>
          </TableAdapter>
        </Tables>
        <Sources>
        </Sources>
      </DataSource>
    </xs:appinfo>
  </xs:annotation>
  <xs:element name="CollectionDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:Generator_UserDSName="CollectionDataSet" msprop:Generator_DataSetName="CollectionDataSet">
    <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="Collection" msprop:Generator_UserTableName="Collection" msprop:Generator_RowDeletedName="CollectionRowDeleted" msprop:Generator_RowChangedName="CollectionRowChanged" msprop:Generator_RowClassName="CollectionRow" msprop:Generator_RowChangingName="CollectionRowChanging" msprop:Generator_RowEvArgName="CollectionRowChangeEvent" msprop:Generator_RowEvHandlerName="CollectionRowChangeEventHandler" msprop:Generator_TableClassName="CollectionDataTable" msprop:Generator_TableVarName="tableCollection" msprop:Generator_RowDeletingName="CollectionRowDeleting" msprop:Generator_TablePropName="Collection">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="BaseItemID" msprop:Generator_UserColumnName="BaseItemID" msprop:Generator_ColumnVarNameInTable="columnBaseItemID" msprop:Generator_ColumnPropNameInRow="BaseItemID" msprop:Generator_ColumnPropNameInTable="BaseItemIDColumn" type="xs:int" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:choice>
    </xs:complexType>
    <xs:unique name="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:Collection" />
      <xs:field xpath="mstns:BaseItemID" />
    </xs:unique>
  </xs:element>
</xs:schema>